GET endpoint using OpenSearch (also known as Elastic Search)
GET
GET requests are used to read either a single or a collection resource.
-
GET requests for individual resources will usually generate a 404 if the resource does not exist;
-
GET requests for collection resources may return either 200 (if the collection is empty) or 404 (if the collection is missing);
-
GET requests must NOT have a request body payload;
Note: GET requests on collection resources should provide sufficient filter and pagination mechanisms;
We have created a video that gives developers a good understanding of how we build API Endpoints using OpenSearch (also known as ElasticSearch) from beginning to end, following best practices.